Skip to content

feat(platform-objects): lock studio & account apps with ADR-0010 full protection#1774

Merged
os-zhuang merged 2 commits into
mainfrom
feat-lock-platform-apps
Jun 12, 2026
Merged

feat(platform-objects): lock studio & account apps with ADR-0010 full protection#1774
os-zhuang merged 2 commits into
mainfrom
feat-lock-platform-apps

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

setup already ships protection: { lock: 'full' } (ADR-0010 §3.7), but studio and account had no protection block, so tenant overlay writes via PUT /api/v1/meta/app/{studio,account} succeeded. The objectui NavigationSyncEffect bug demonstrated the hazard by writing auto-navigation pages into these writable system apps.

Both are core platform UI in the same class as Setup:

  • studio — the metadata workbench; a broken tenant overlay locks implementers out of the very surface used to repair metadata
  • account — every authenticated user's only self-service security surface (sessions / API keys / linked accounts), so a broken overlay is a security-relevant outage

Changes

  • Add protection: { lock: 'full', reason, docsUrl } to studio.app.ts and account.app.ts, mirroring setup.app.ts
  • Regression test pinning lock: 'full' on all three platform apps (and AppSchema parse)

Notes

  • Setup-style navigation contributions are unaffected — they are a registration-time in-memory merge, not overlay writes, and nothing in the repo targets studio/account with contributions
  • objectui's isNavigationSyncableApp already filters on _lock ∈ {full, no-overlay}, so client behavior is automatically correct once the server serves the lock
  • Server-side L3 enforcement applies in tenant scope (environmentId set); standalone/control-plane stacks skip it by design (protocol.ts assertLockAllowsWrite)

Test plan

  • vitest run src/platform-objects.test.ts — new protection tests pass (the one failing SETUP_NAV_CONTRIBUTIONS test also fails on clean main, pre-existing)
  • tsc --noEmit clean
  • End-to-end: rebuilt package, booted showcase, GET /api/v1/meta/app serves _lock: "full" + reason for setup/studio/account

🤖 Generated with Claude Code

… protection

Studio and Account shipped without a protection block, so tenant
overlay writes to PUT /api/v1/meta/app/{studio,account} succeeded —
the NavigationSyncEffect bug in objectui demonstrated the hazard by
writing auto-navigation into these system apps. Both are core platform
UI in the same class as Setup (which already carries lock: 'full'):

- studio: the metadata workbench — a broken overlay locks implementers
  out of the very surface used to repair metadata
- account: every authenticated user's only self-service security
  surface (sessions / API keys / linked accounts)

The loader translates protection into the _lock envelope; objectui's
isNavigationSyncableApp already filters on _lock ∈ {full, no-overlay},
so client behavior is automatically correct. Setup-style navigation
contributions are unaffected (registration-time in-memory merge, not
overlay writes).

Adds a regression test pinning lock: 'full' on all three platform apps.

Verified end-to-end on a rebuilt showcase stack: GET /api/v1/meta/app
now serves _lock: "full" for setup, studio, and account.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 12, 2026 8:50am

Request Review

…1771

#1771 moved both marketplace entries out to cloud-connection's plugins
but left the now-empty contribution behind, tripping the
SETUP_NAV_CONTRIBUTIONS test ('items.length > 0') and turning main CI
red. The group_apps shell anchor stays in setup.app.ts and is filled
entirely by capability plugins.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit cbeef9e into main Jun 12, 2026
12 checks passed
@os-zhuang
os-zhuang deleted the feat-lock-platform-apps branch June 12, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant